/**
 * Created by Administrator on 2017/6/5.
 */
var net = require('net');
var server = net.createServer();
server.on("connection", function (socket) {
	console.log("客户端与服务器已建立")
	socket.setEncoding("utf-8");
	socket.on("data",function (data) {
		console.log("已收到的数据： "+data);
		socket.write("确定数据 "+data)
	})
})
server.listen(8431,'localhost',function () {
	console.log("listened");
})